www.gusucode.com > 6KBBS ASP版 V7.1 > 6KBBS ASP版 V7.1\code\bbs\Paper.asp
<!--#include file="conn.asp"--><!--#include file="inc/fun.asp"--><!--#include file="inc/ubbcode.asp"--> <% dim Cssstyleid,action,paper,id,picurl,lguserid,topicuserid,lgname,bbsid,bd,totable,adminbd,usertype,i,badwords Cssstyleid=request.cookies(prefix&"1")("styleid") %> <link rel="stylesheet" type="text/css" href="skin/<%=Cssstyleid%>/bbs.css"> <link rel="stylesheet" type="text/css" href="skin/<%=Cssstyleid%>/global.css"> <body topmargin=0> <% action=request.querystring("action") select case action case"showpic" id=checknum(request.querystring("id")) picurl=request.querystring("picurl") conn.execute("update upload set hits=hits+1 where id="&id&"") response.redirect"upload/"&picurl case"" id=checknum(request.querystring("id")) set rs=conn.execute("select*from paper where id="&id&"") paper=rs("paper") paper=split(paper,"|") %><title><%=checktitle(application(prefix&"bbsname"))%>——查看公告</title> <div class=papertop>查看公告</div> <div class=papertitle><%=checktitle(paper(0))%></div> <div class=paperbody><%=ubb(paper(3))%></div> <div class=papertime><%=checktitle(paper(1))%> 发表于: <%=checktitle(paper(2))%></div> <% set rs=nothing case "preview" dim topic,content,bad,b function checkbad(str) if isnull(str) then exit function bad=split(application(prefix&"badcontent"), "|") for b=0 to ubound(bad) str=Replace(str,bad(b),string(len(bad(b)),"*")) next checkbad=str end function topic=Request.Form("topic") topic=checkbad(Replace(topic,"|","│")) content=checkbad(Request.Form("content")) content=replace(content,"|","│") %> <title><%=checktitle(application(prefix&"bbsname"))%>——预览内容</title> <div class=papertop>预览内容</div> <div class=papertitle><%=checktitle(topic)%></div> <div class=paperbody><%=ubb(content)%></div> <%case"showdelbbs" bbsid=checknum(request.querystring("bbsid")) bd=checknum(request.querystring("bd")) totable=checknum(request.querystring("totable")) adminbd=session(prefix&"adminbd") usertype=checknum(session(prefix&"usertype")) if usertype<3 or (usertype=3 and instr("|"&adminbd&"|","|"&bd&"|")=0) then response.end end if set rs=conn.execute("select top 1 * from bbs"&totable&" where bbsid="&bbsid&" and bd="&bd&"") content=rs("content") content=split(content,"|") %> <title><%=checktitle(application(prefix&"bbsname"))%>——回收站</title> <div class=papertop>查看帖子</div> <div class=paperbody><%=ubb(content(4))%></div> <div class=papertime><%=checktitle(content(2))%> 发表于 <%=checktitle(content(5))%></div> <%set rs=nothing%> <%case"checkreg" %><!--#include file="inc/regfun.asp"--><% dim name,email,mes,z name=Replace(Request.Form("name"),"'","''") email=Replace(Request.Form("email"),"'","''") if name="" or email="" then mes="·请填写完整用户名和E-mail,以便检测,谢谢。<br>" else if strlength(name)>16 then mes="·你的用户名长度超过了16。<br>" end if if not pass_name(name) then mes=mes&"·你的用户名含有非法字符。<br>" end if badwords=split(application(prefix&"badwords"),"|") for z=0 to ubound(badwords) if instr(name,badwords(z))>0 then mes=mes&"·你的用户名含有论坛禁止使用的字词。<br>" exit for end if next '添加 2005-2-4 if pass_name(name) then if not conn.execute("select top 1 userid from [user] where name='"&name&"'").eof then mes=mes&"·该用户名已经被注册了。<br>" end if '结束 email=server.HTMLEncode(email) if not IsValidEmail(email) then mes=mes&"·你的E-mail填写错误。<br>" if isnull(mes) or mes="" then mes="您填写的资料可以正常注册。" end if%> <title>检测用户名</title> <div class=papertop>检测用户名</div> <div class=paperbody><%=mes%></div> <%end select%><div class=paperclose><a href=# onclick="window.close();">[× 关闭窗口]</a></div> <%set rs=nothing%>